# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================

# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================

SVO = 0
Round 0, Return: {'av': [168.28072337136433]} for agent av
Round 1, Return: {'av': [51.2300717285007]} for agent av
Round 2, Return: {'av': [171.28652009757]} for agent av
Round 3, Return: {'av': [90.34121281582925]} for agent av
Round 4, Return: {'av': [49.97180629459284]} for agent av
Round 5, Return: {'av': [-178.01281859107627]} for agent av
Round 6, Return: {'av': [-23.901805202200865]} for agent av
Round 7, Return: {'av': [-43.16447078715307]} for agent av
Round 8, Return: {'av': [156.59149217029162]} for agent av
Round 9, Return: {'av': [271.07206836941987]} for agent av
==== Summary of results ====
Return:
[2.6534674921192165, 2.6806702712921613, 2.5857482211386023, 2.608534128230283, 2.5666084521007915, 2.5478765491105473, 2.364540569846706, 2.5432837606958114, 2.602741677347135, 2.615511625642736]
For agent av
[[168.28072337136433], [51.2300717285007], [171.28652009757], [90.34121281582925], [49.97180629459284], [-178.01281859107627], [-23.901805202200865], [-43.16447078715307], [156.59149217029162], [271.07206836941987]]
Average, std return: 71.36948002671383, 123.34045424051622 for agent av

Speed, mean (m/s):
[2.6534674921192165, 2.6806702712921613, 2.5857482211386023, 2.608534128230283, 2.5666084521007915, 2.5478765491105473, 2.364540569846706, 2.5432837606958114, 2.602741677347135, 2.615511625642736]
Average, std: 2.576898274752399, 0.08188001270913947

Speed, std (m/s):
[0.6880465315019728, 0.5644525316663839, 0.624916265290446, 0.8114243542269055, 0.8169910306370195, 0.8809417988253018, 0.6722519349550636, 0.8035497462663119, 0.5868795371418619, 0.5254944401287949]
Average, std: 0.6974948170640062, 0.11733455011998019

Outflows (veh/hr):
[1044.0, 1063.6363636363637, 1062.0, 920.2168861347793, 893.4850051706308, 697.6744186046511, 954.0, 846.5845464725643, 1116.0, 1104.1666666666665]
Average, std: 970.1763886685656, 126.49334022841485
Inflows (veh/hr):
[1206.0, 1309.090909090909, 1242.0, 1199.0704879938032, 1228.5418821096173, 1325.581395348837, 1134.0, 1209.4064949608062, 1260.0, 1291.6666666666665]
Average, std: 1240.5357836170638, 55.04795974575441
Throughput efficiency (veh/hr):
[0.8656716417910447, 0.8125000000000001, 0.855072463768116, 0.7674418604651163, 0.7272727272727273, 0.5263157894736842, 0.8412698412698413, 0.7, 0.8857142857142857, 0.8548387096774194]
Average, std: 0.7836097319432235, 0.10398333535911274
338.6766

SVO = pi / 2
Round 0, Return: {'av': [210.17440590315067]} for agent av
Round 1, Return: {'av': [123.37174041063412]} for agent av
Round 2, Return: {'av': [165.2989407619883]} for agent av
Round 3, Return: {'av': [-62.91580455344913]} for agent av
Round 4, Return: {'av': [97.23525237726565]} for agent av
Round 5, Return: {'av': [23.47924348216268]} for agent av
Round 6, Return: {'av': [364.6437148955546]} for agent av
Round 7, Return: {'av': [304.93752142484163]} for agent av
Round 8, Return: {'av': [328.6000857474774]} for agent av
Round 9, Return: {'av': [280.2839544612438]} for agent av
==== Summary of results ====
Return:
[2.8339949097313735, 2.5303860266974243, 2.6127762468443936, 2.1890984641335445, 2.392917102655695, 3.603119625728745, 2.5025219431060557, 2.6188698220662636, 2.452456551815316, 2.434639399668655]
For agent av
[[210.17440590315067], [123.37174041063412], [165.2989407619883], [-62.91580455344913], [97.23525237726565], [23.47924348216268], [364.6437148955546], [304.93752142484163], [328.6000857474774], [280.2839544612438]]
Average, std return: 183.51090549108696, 132.81885883162502 for agent av

Speed, mean (m/s):
[2.8339949097313735, 2.5303860266974243, 2.6127762468443936, 2.1890984641335445, 2.392917102655695, 3.603119625728745, 2.5025219431060557, 2.6188698220662636, 2.452456551815316, 2.434639399668655]
Average, std: 2.6170780092447465, 0.36521089696528225

Speed, std (m/s):
[0.6766456375747812, 0.6181236173258092, 0.6295082099659407, 0.7156501413620764, 0.5820585487955693, 0.8069214997183435, 0.5484504851212919, 0.6267555528667094, 0.5492726006696621, 0.5549892276285878]
Average, std: 0.6308375521028771, 0.07877183265764243

Outflows (veh/hr):
[1102.0408163265306, 961.4243323442136, 962.5668449197861, 972.0, 1027.3483947681332, 0.0, 1098.0, 1076.086956521739, 1098.0, 1098.0]
Average, std: 939.5467344880402, 318.2591456611221
Inflows (veh/hr):
[1591.8367346938774, 1317.507418397626, 1395.7219251336899, 1152.0, 1219.9762187871581, 2373.6263736263736, 1278.0, 1345.1086956521738, 1296.0, 1278.0]
Average, std: 1424.7777366290898, 335.10345132710995
Throughput efficiency (veh/hr):
[0.6923076923076924, 0.7297297297297297, 0.6896551724137931, 0.84375, 0.8421052631578948, 0.0, 0.8591549295774648, 0.8, 0.8472222222222222, 0.8591549295774648]
Average, std: 0.7163079938986262, 0.24730213737169507
328.019168

SVO = pi / 4
Round 0, Return: {'av': [561.7383684775225]} for agent av
Round 1, Return: {'av': [234.92438295681922]} for agent av
Round 2, Return: {'av': [369.94306678748245]} for agent av
Round 3, Return: {'av': [393.13265384613544]} for agent av
Round 4, Return: {'av': [412.5960091603227]} for agent av
Round 5, Return: {'av': [451.01606417334233]} for agent av
Round 6, Return: {'av': [633.2464134948565]} for agent av
Round 7, Return: {'av': [278.2025023077594]} for agent av
Round 8, Return: {'av': [536.2518266298233]} for agent av
Round 9, Return: {'av': [336.9713694569333]} for agent av
==== Summary of results ====
Return:
[2.499810115538733, 2.4321677791280463, 2.4782038087843468, 2.485241775936009, 2.4758657897834855, 2.4606153299597113, 2.5909477366692357, 2.3810899997897437, 2.475745926042995, 2.3878493149474007]
For agent av
[[561.7383684775225], [234.92438295681922], [369.94306678748245], [393.13265384613544], [412.5960091603227], [451.01606417334233], [633.2464134948565], [278.2025023077594], [536.2518266298233], [336.9713694569333]]
Average, std return: 420.8022657290997, 120.23705040193057 for agent av

Speed, mean (m/s):
[2.499810115538733, 2.4321677791280463, 2.4782038087843468, 2.485241775936009, 2.4758657897834855, 2.4606153299597113, 2.5909477366692357, 2.3810899997897437, 2.475745926042995, 2.3878493149474007]
Average, std: 2.4667537576579712, 0.05652585835563165

Speed, std (m/s):
[0.5976762538744248, 0.7005836631682902, 0.5887766335478096, 0.4991480330868693, 0.5852106009452867, 0.5172974455535104, 0.5752780450742956, 0.5647045472315793, 0.5439555260583326, 0.6314727514424928]
Average, std: 0.5804103499982891, 0.0544324465974936

Outflows (veh/hr):
[1080.0, 961.7486338797813, 1044.0, 1044.0, 1008.0, 1098.0, 1062.0, 1008.0, 1080.0, 1026.0]
Average, std: 1041.1748633879781, 39.28545947278254
Inflows (veh/hr):
[1242.0, 1136.6120218579233, 1206.0, 1206.0, 1206.0, 1278.0, 1206.0, 1170.0, 1242.0, 1206.0]
Average, std: 1209.8612021857923, 37.06427213294447
Throughput efficiency (veh/hr):
[0.8695652173913043, 0.8461538461538463, 0.8656716417910447, 0.8656716417910447, 0.835820895522388, 0.8591549295774648, 0.8805970149253731, 0.8615384615384616, 0.8695652173913043, 0.8507462686567164]
Average, std: 0.8604485134738947, 0.0123879167358347
456.848538